<html>

<head>

  <title>TFontManager</title>

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="../../../../../Styles/Default.css" type="text/css">

  <meta name="Ancestor" content="">
<script type="text/javascript" src="../../../../../CodeScripts/SyntaxHighlighter/scripts/shCore.js"></script><script type="text/javascript" src="../../../../../CodeScripts/SyntaxHighlighter/scripts/shBrushDelphi.js"></script><script type="text/javascript" src="../../../../../CodeScripts/SyntaxHighlighter/scripts/shBrushCpp.js"></script><script type="text/javascript" src="../../../../../CodeScripts/SyntaxHighlighter/scripts/shBrushCSharp.js"></script><link rel="stylesheet" type="text/css" href="../../../../../Styles/default.css"/><link rel="stylesheet" type="text/css" href="../../../../../Menu/menu.css"/><link rel="stylesheet" type="text/css" href="../../../../../CodeScripts/SyntaxHighlighter/styles/shCoreDefault.css"/><link rel="stylesheet" type="text/css" href="../../../../../CodeScripts/SyntaxHighlighter/styles/shThemeDefault.css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"><script type="text/javascript" src="../../../../../Menu/menu.js"></script><script type="text/javascript" src="../../../../../CodeScripts/bootstrap.js"></script>
</head>

<body bgcolor="#FFFFFF">
  <div class="menu" id="menu"><a class="ancestor" href="../../../../_Body.htm">Index</a><a class="ancestor" href="../../_Body.htm">Img32.Text</a><span class="active">TFontManager</span>
  </div><br><br>

  <h1>TFontManager</h1>
  <p> This class is intended primarily for single instance use. The <a href="../../Routines/FontManager.htm"><b>FontManager</b></a> function accesses the single instance <b>TFontManager</b> object that's automatically constructed by the library. 
    <div class="code">
      <pre class="brush: delphi;">
var
  arialFont: TFontReader;
  sansBoldFont: TFontReader;
  fontInfo: TFontInfo;
begin
  FontManager.LoadFromResource('my_ttf_font'; RT_RCDATA);

  arialFont := FontManager.Load('Arial');
  
  FontManager.Load('Arial Bold');
  FontManager.Load('Arial Italic');
  FontManager.Load('Arial Bold Italic');
  FontManager.Load('Times New Roman');
  FontManager.Load('Times New Roman Bold');
  FontManager.Load('Times New Roman Italic');
  FontManager.Load('Times New Roman Bold Italic');

  //now find the font that best matches - bold sans-serif
  FillChar(fontInfo, SizeOf(fontInfo), 0);
  fontInfo.fontFamily := ttfSansSerif;
  fontInfo.macStyles := [msBold];
  sansBoldFont := FontManager.GetBestMatchFont(fontInfo);
      </pre>
    </div> </p>
  <h2 id="Auto-Reference">Reference</h2>
  <p>
    <table class="autoTbl">
      <tr>
        <th>Methods</th>
        <th style="width: 100%;">Properties</th>
      </tr>
      <tr>
        <td><a href="Methods/Clear.htm">Clear</a>
        </td>
        <td><a href="Properties/MaxFonts.htm">MaxFonts</a>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/Delete.htm">Delete</a>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/GetBestMatchFont.htm">GetBestMatchFont</a>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/Load.htm">Load</a>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/LoadFromFile.htm">LoadFromFile</a>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/LoadFromResource.htm">LoadFromResource</a>
        </td>
        <td>
        </td>
      </tr>
      <tr>
        <td><a href="Methods/LoadFromStream.htm">LoadFromStream</a>
        </td>
        <td>
        </td>
      </tr>
    </table></p>
  <h2 id="Auto-SeeAlso">See Also</h2>
  <p class="Body"><a href="../../Routines/FontManager.htm">FontManager</a></p>
  <p class="Copyright" id="auto"> <br><br> Copyright &copy;2010-2023 Angus Johnson&nbsp; - &nbsp;Image32 4.2&nbsp; - &nbsp;Help file built on 26 Mar 2023 <br><br> </p>

</body>

</html>